import React, { useEffect, useState } from 'react'
import usePosition from '../hook/usePosition'

export default function Mouse() {
    let {x,y} = usePosition();
    x -= 200;
    y -= 60;
    return (
        <div
            style={
                {
                    width: 50,
                    height: 50,
                    background: 'green',
                    position: 'absolute',
                    left: x,
                    top: y
                }
            }
        >Mouse</div>
    )
}
